#include "complex.h"

Complex::Complex():real(0), image(0)
{

}

Complex::Complex(double real, double image)
{
    this->real = real;
    this->image = image;
}

Complex::~Complex()
{

}

Complex Complex::operator+(const Complex & a)
{
    Complex tmp;
    tmp.real = this->real + a.real;
    tmp.image = this->image + a.image;
    return tmp;
}
Complex Complex::operator-(const Complex & a)
{
    Complex tmp;
    tmp.real = this->real - a.real;
    tmp.image = this->image - a.image;
    return tmp;
}
void Complex::display()
{
    std::cout << this->real << " + " << this->image << "i" << std::endl;

}